Skip to content

Conversation

@klausler
Copy link
Contributor

@klausler klausler commented Apr 7, 2025

Make some minor tweaks (inlining, caching) to the formatting input path to improve integer input in a SPEC code. (None of the I/O library has been tuned yet for performance, and there are some easy optimizations for common cases.) Input integer values are now calculated with native C/C++ 128-bit integers.

A benchmark that only reads about 5M lines of three integer values each speeds up from over 8 seconds to under 3 in my environment with these changeds.

If this works out, the code here can be used to optimize the formatted input paths for real and character data, too.

Fixes #134026.

@llvmbot llvmbot added the flang Flang issues not falling into any other category label Apr 7, 2025
@s-watanabe314
Copy link
Contributor

I'm sorry, I can't review the code because I'm not familiar with it. However, as I mentioned in #134026, I confirmed that this patch improves performance.

Make some minor tweaks (inlining, caching) to the formatting input
path to improve integer input in a SPEC code.  (None of the I/O
library has been tuned yet for performance, and there are some
easy optimizations for common cases.)  Input integer values are
now calculated with native C/C++ 128-bit integers.

A benchmark that only reads about 5M lines of three integer values each
speeds up from over 8 seconds to under 3 in my environment with these
changeds.

If this works out, the code here can be used to optimize the formatted
input paths for real and character data, too.

Fixes llvm#134026.
@klausler klausler merged commit 18fe012 into llvm:main Apr 10, 2025
11 checks passed
@klausler klausler deleted the bug134026 branch April 10, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flang] read statement is slower than Gfortran in SPEC CPU 2017

4 participants